home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / utility / mu17_ext.zip / TALKTO.BAK < prev    next >
Text File  |  1994-03-07  |  1KB  |  60 lines

  1. #include <stdlib.h>
  2. #include <exec/types.h>
  3. #include <exec/ports.h>
  4. #include <exec/memory.h>
  5. #include <dos/dos.h>
  6. #include <clib/exec_protos.h>
  7. #include <clib/alib_protos.h>
  8. #include <stdio.h>
  9. #include <string.h>
  10. #include <intuition/intuition.h>
  11. #include <proto/all.h>
  12. #include <clib/dos_protos.h>
  13. #include <utility/tagitem.h>
  14. #include <clib/multiuser_protos.h>
  15. #include <libraries/Multiuser.h>
  16. #include <proto/multiuser.h>
  17.  
  18. #include "headers/talkto_proto.h"
  19. #include "headers/deamon.h"
  20. #include "headers/Error_proto.h"
  21. #include "headers/global.h"
  22.  
  23. BOOL Error(char *);
  24.  
  25. int CXBRK(void) { return(0); }
  26. int chkabort(void) {return(0);}
  27.  
  28. struct CurrentUser    *ID;
  29.  
  30. BOOL SafePutToPort(struct Message *, STRPTR);
  31.  
  32. unsigned long TalkTo(User,Pass,Pass1,USERDATA)
  33. char        *User,*Pass,*Pass1;
  34. unsigned long     USERDATA;
  35. {
  36.     struct TagItem        tags[4];
  37.     struct Library        *muBase;
  38.  
  39.     if (!(muBase = OpenLibrary("multiuser.library",NULL))) {
  40.         fprintf(stderr,"cannot open multiuser.library");
  41.         return FALSE;
  42.     }
  43.  
  44.  
  45.     tags[0].ti_Tag = muT_Global;
  46.     tags[0].ti_Data = TRUE;
  47.  
  48.     tags[1].ti_Tag = muT_UserID;
  49.     tags[1].ti_Data = (ULONG) User;
  50.     
  51.     tags[2].ti_Tag = muT_Password;
  52.     tags[2].ti_Data = (ULONG) Pass;
  53.  
  54.     tags[3].ti_Tag = TAG_DONE;
  55.     
  56.     return muLoginA(tags);
  57.  
  58.     if (muBase) CloseLibrary(muBase);
  59. }
  60.